from redis import StrictRedis
import datetime
redis = StrictRedis(host="192.168.139.3",port=6379,db=0,password="Lzzy@2022")
sales = redis.zadd("sales",{"2022-01-10": 400, "2022-01-11": 200, "2022-01-12": 300,
                            "2022-01-13": 320, "2022-01-14": 420, "2022-01-15": 410,
                            "2022-01-16": 40, "2022-01-17": 510})
print(redis.zrange("sales", 0, -1, withscores=1))
